package com.vooda.dao;

import com.vooda.entity.Store;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author KennyDavid
 */
public interface StoreDao extends JpaRepository<Store, Long>, JpaSpecificationExecutor<Store> {

    /**
     * 按照时间查找前4个商户信息
     *
     * @param isDel 是否删除
     * @param marketId 超市id
     * @return list
     */
    List<Store> findTop4ByIsDelAndMarketIdOrderByCreateTimeDesc(Boolean isDel,Long marketId);
}
